﻿/// <summary>
/// https://leetcode-cn.com/problems/divide-two-integers/
/// </summary>
public class Solution
{
    public int Divide(int dividend, int divisor)
    {
        var ans = Math.Truncate((double)dividend / divisor);
        return ans is < int.MinValue or > int.MaxValue ? int.MaxValue : (int)ans;
    }
}